//
//  JXVideoRecordModel.h
//  JXIntercomSDK
//
//  Created by Nansen on 2020/4/16.
//  Copyright © 2020 jingxi. All rights reserved.
//

/// 录像存储在沙盒对应的目录中

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface JXVideoRecordModel : NSObject

/// 该条视频记录对应的 id
@property (nonatomic, copy) NSString *recordId;
/// 对应的 JXCallRecordModel 的 homeId
@property (nonatomic, copy) NSString *homeId;
/// 对应的 JXCallRecordModel 的 sessionId
@property (nonatomic, copy) NSString *sessionId;

/// 设备别名
@property (nonatomic, copy) NSString *deviceAlias;
/// 文件夹路径:一般是时间戳 e.g. 13203138231365510
@property (nonatomic, copy) NSString *folderName;
/// 封面截图的文件名 e.g. 13203394960184379.jpeg
@property (nonatomic, copy, nullable) NSString *jpegFileName;
/// 视频文件的文件名 e.g. 13203394960184379.rec
@property (nonatomic, copy, nullable) NSString *recFileName;

/// 录像开始的时间戳(13位,毫秒)
@property (nonatomic, assign) NSInteger startTime;
/// 录像结束的时间戳(13位,毫秒)
@property (nonatomic, assign) NSInteger endTime;



#pragma mark - ======== func ========
/** 图片的完整路径 */
- (NSString * _Nullable)fullImagePath;
/// 图片文件是否还存在沙盒中
- (BOOL)imageIsExsit;
/// 获得图片对象
- (UIImage * _Nullable)imageFromFile;


/** 视频的完整路径 */
- (NSString * _Nullable)fullRecPath;
/// 视频文件是否还存在沙盒中
- (BOOL)videoIsExsit;

/// 录像时长(秒)
- (NSInteger)durationSecond;
/** 录像时长, 转化成 (x:)xx:xx */
- (NSString * _Nullable)hourAndMinute;

/// 录像的创建时间
- (NSDate * _Nullable)createDate;



@end

NS_ASSUME_NONNULL_END
